package net.vsame.url2sql.web.bigpipe;

public class BigpipeCode {

	private int code;
	private String msg = "";
	private String url = "";
	
	public BigpipeCode() {
	}
	
	public BigpipeCode(int code, String msg, String url) {
		this.code = code;
		this.msg = msg;
		this.url = url;
	}
	
	public int getCode() {
		return code;
	}
	public void setCode(int code) {
		this.code = code;
	}
	public String getMsg() {
		return msg;
	}
	public void setMsg(String msg) {
		if(msg == null){
			return ;
		}
		msg.replace("'", "\\'");
		this.msg = msg;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		if(url == null){
			return ;
		}
		url.replace("'", "\\'");
		this.url = url;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + code;
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BigpipeCode other = (BigpipeCode) obj;
		if (code != other.code)
			return false;
		return true;
	}
}
